Can we take the gradients of our emulators? I investigate.
In [2]:
from pearce.emulator import NashvilleHot
from GPy.kern import *
import numpy as np
from os import path
In [4]:
'/scratch/users/swmclau2/xi_gg_zheng07/'
Out[4]:
In [5]:
training_file = '/scratch/users/swmclau2/xi_gg_zheng07/PearceXiggCosmo.hdf5'
In [6]:
em_method = 'gp'
In [7]:
fixed_params = {'z':0.0}
In [8]:
emu = NashvilleHot(training_file, hyperparams={},fixed_params = fixed_params, downsample_factor = 0.2)
In [10]:
model = emu._emulators[0]
In [18]:
bounds = [emu.get_param_bounds(name) for name in emu.get_param_names()]
x_new = np.array([np.random.uniform(b[0], b[1]) for b in bounds])
In [21]:
x_new = x_new.reshape((1,-1))
In [23]:
kern1 = model.kern1
Answer: No
In [ ]: